var AJ=window.AJ=window.oy.AJ={
	getReq:function(){
		var req=null;
		try{
			req=new XMLHttpRequest();
		}catch (e){
			try{
				req=new ActiveXObject("Msxml2.XMLHTTP");
			}catch (e){
				req=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		return req;
	},
	send:function(onwait,onok,method,url,queryString,asyn){
		var aj=this,req=aj.getReq(),now=new Date().getTime();
		req.onreadystatechange=function(){
			if(req.readyState==4 && req.status==200){
				onok(req.responseText);
			}else{
				onwait(req,now);
			}
		}
		req.open(method,url,asyn);
		if(method=='POST'){req.setRequestHeader('content-Type','application/x-www-form-urlencoded');}
		req.send(queryString);
	},
	get:function(onwait,onok,url,asyn){
		this.send(onwait,onok,'GET',url,null,asyn||true);
	},
	post:function(onwait,onok,url,queryString,asyn){
		this.send(onwait,onok,'POST',url,queryString,asyn||true);
	}
}
//AJ.get(function(req,now){},function(txt){},url,asyn);
//AJ.post(function(req,now){},function(txt){},url,queryString,asyn);